package xcmg.device.dao.entity.logistic;

import java.math.BigDecimal;
import java.util.Objects;

public class LogisticWaybillDetailDO {
    private String id;
    //物流运单表LOGISTIC_WAYBILL单据id
    private String wayBillId;
    //业务单据号，目前存发运交接单号或三包出库单号
    private String businessOrderNo;

    private String materialsNo;

    private String materialsDesc;
    //物流发运数量
    private BigDecimal amount;
    //单位
    private String unit;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id == null ? null : id.trim();
    }

    public String getWayBillId() {
        return wayBillId;
    }

    public void setWayBillId(String wayBillId) {
        this.wayBillId = wayBillId == null ? null : wayBillId.trim();
    }

    public String getBusinessOrderNo() {
        return businessOrderNo;
    }

    public void setBusinessOrderNo(String businessOrderNo) {
        this.businessOrderNo = businessOrderNo == null ? null : businessOrderNo.trim();
    }

    public String getMaterialsNo() {
        return materialsNo;
    }

    public void setMaterialsNo(String materialsNo) {
        this.materialsNo = materialsNo == null ? null : materialsNo.trim();
    }

    public String getMaterialsDesc() {
        return materialsDesc;
    }

    public void setMaterialsDesc(String materialsDesc) {
        this.materialsDesc = materialsDesc == null ? null : materialsDesc.trim();
    }

    public BigDecimal getAmount() {
        return amount;
    }

    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        LogisticWaybillDetailDO detailDO = (LogisticWaybillDetailDO) o;
        return Objects.equals(wayBillId, detailDO.wayBillId) &&
                Objects.equals(businessOrderNo, detailDO.businessOrderNo) &&
                Objects.equals(materialsNo, detailDO.materialsNo);
    }

    @Override
    public int hashCode() {
        return Objects.hash(wayBillId, businessOrderNo, materialsNo);
    }
}
